﻿using System;
using System.Windows.Forms;

namespace BackEndProcessorInterface
{
    public partial class WorkConsole : Form
    {
        public WorkConsole()
        {
            InitializeComponent();
        }
        public void SetText(String message)
        {
            textBoxWorkInfo.Text += message + "\r\n";
        }

        private void buttonClear_Click(object sender, EventArgs e)
        {
            textBoxWorkInfo.Text = "";
        }

        private void WorkConsole_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
        }

        private void textBoxWorkInfo_TextChanged(object sender, EventArgs e)
        {
            textBoxWorkInfo.SelectionStart = textBoxWorkInfo.TextLength;
            textBoxWorkInfo.ScrollToCaret();
        }
    }
}
